def read_in_chunks(file_obj, chunk_size = 2048):
    """
    逐件读取文件
    默认块大小：2KB
    """
    while True:
        data = file_obj.read(chunk_size)  # 每次读取指定的长度
        if not data:
            break
        yield data

with open('file.txt', 'r', encoding = 'utf-8') as f:
    for chuck in read_in_chunks(f):
        print(chuck)